/* $Id: SaveDatabaseAsUnitTest.java 63 2010-02-14 13:52:34Z aaron.day $ */
package org.crazydays.gameplan.db.action;


import java.awt.event.ActionEvent;

import org.junit.*;

import static org.easymock.EasyMock.*;
import static org.easymock.classextension.EasyMock.*;

import org.crazydays.gameplan.controller.Controller;
import org.crazydays.gameplan.db.action.SaveDatabaseAs;

/**
 * SaveDatabaseAs
 */
public class SaveDatabaseAsUnitTest
{
    /**
     * Test actionPerformed(ActionEvent).
     */
    @Test
    public void testActionPerformed()
    {
        // mocks
        Controller controller = createMock(Controller.class);
        ActionEvent event = createMock(ActionEvent.class);

        // expect
        controller.save(true);

        // replay
        replay(controller, event);

        // setup
        SaveDatabaseAs action = new SaveDatabaseAs();
        action.setController(controller);

        // test
        action.actionPerformed(event);

        // verify
        verify(controller, event);
    }
}
